import { createApp } from 'vue';
import './style.css';
import App from './App.vue';
import { createRouter, createWebHistory } from 'vue-router';

// 定义路由
const routes = [
    { path: '/login', component: () => import('./pages/login.vue') },
    { path: '/', component: () => import('./pages/main.vue') },
    //   { path: '/about', component: () => import('./components/About.vue') }
];

// 创建路由实例并传递 `routes` 配置
const router = createRouter({
    history: createWebHistory(),
    routes
});

// 创建应用实例并挂载
const app = createApp(App);
app.use(router);
app.mount('#app');
